﻿#region Copyright and License
/*==============================================================================
 *  Copyright (c) cndotnet.org Corporation.  All rights reserved.
 * ===============================================================================
 * This code and information is provided "as is" without warranty of any kind,
 * either expressed or implied, including but not limited to the implied warranties
 * of merchantability and fitness for a particular purpose.
 * ===============================================================================
 * Licensed under the GNU General Public License (GPL) v2
 * http://www.cndotnet.org/ucenter
 * ==============================================================================*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UCenter.DependenceInjection
{
    /// <summary>
    /// The event arguments of container failed event
    /// </summary>
    public class ContainerFailedEventArgs : ContainerEventArgs
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ContainerFailedEventArgs"/> class.
        /// </summary>
        /// <param name="body">The body.</param>
        /// <param name="type">The type.</param>
        public ContainerFailedEventArgs(Object body, ContainerType type)
            : base(body, type)
        { 
           
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="ContainerFailedEventArgs"/> class.
        /// </summary>
        /// <param name="body">The body.</param>
        /// <param name="type">The type.</param>
        /// <param name="error">The error.</param>
        public ContainerFailedEventArgs(Object body, ContainerType type, Exception error)
            : this(body, type) 
        {
            this.Error = error;
        }

        /// <summary>
        /// Gets or sets the error.
        /// </summary>
        /// <value>The error.</value>
        public Exception Error { get; set; }
    }
}
